package com.neusoft.neumooc.service;

import java.util.List;
import java.util.Map;

import com.neusoft.core.common.exception.DAOException;
import com.neusoft.core.common.exception.ServiceException;
import com.neusoft.neumooc.vo.UserVO;

public interface UserService {
	
	/** 
	 * @Title: getUserByName 
	 * @Description:通过登录名获取用户
	 * @param userName 登录用户名
	 * @return Map<String,Object> 用户名
	 * @throws ServiceException
	 */
	public Map<String,Object> getUserByName(String userName) throws ServiceException;
	
	/** 
	 * @Title: getUser 
	 * @Description:通过id获取用户列表
	 * @param userId 用户id
	 * @return Map<String,Object> 用户id
	 */
	public Map<String,Object> getUser(String userId);
	
	/** 
	 * @Title: queryUserNum 
	 * @Description:查询用户总数
	 * @return int 数量
	 */
	public int queryUserNum() throws DAOException;
	
	/** 
	 * @Title: getUsers 
	 * @Description:分页
	 * @param pageNo,pageSize 
	 * @return List
	 * @throws DAOException
	 */
	public List<UserVO> getUsers(int pageNo, int pageSize) throws DAOException;
	
	/** 
	 * @Title: addUser 
	 * @Description:添加用户
	 * @param userVO
	 * @return boolean
	 * @throws ServiceException
	 */
	public boolean addUser(UserVO userVO) throws ServiceException;
	
	/** 
	 * @Title: updateUser 
	 * @Description:更新用户信息
	 * @param userVO
	 * @return boolean
	 * @throws ServiceException
	 */
	public boolean updateUser(UserVO userVO) throws ServiceException;
	
	
	
	/** 
	 * @Title: getUserInfo 
	 * @Description:通过id获取用户信息
	 * @param userId 用户id
	 * @return UserVO 用户信息
	 * @throws ServiceException
	 */
	public UserVO getUserInfo(String userId) throws ServiceException;
	
	/** 
	 * @Title: updateStatusOn 
	 * @Description:启用用户
	 * @param status 用户角色
	 * @return void 1
	 * @throws ServiceException
	 */
	public void updateStatusOn(String status) throws ServiceException;
	
	/** 
	 * @Title: updateStatusOff
	 * @Description:停用用户
	 * @param status 用户角色
	 * @return void 0
	 * @throws ServiceException
	 */
	public void updateStatusOff(String status) throws ServiceException;
	
	/** 
	 * @Title: deleteUser 
	 * @Description:通过id删除用户
	 * @param userId 用户id
	 * @return int 
	 */
	public int deleteUser(String userId);
	
}
